package tedu.study.ooday04_2;


import java.util.Timer;
import java.util.TimerTask;

public class TimerTest {
    public static void main(String[] args) {
        Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("该起床啦");
            }
        },interval,interval);


        //Test123 t = new Test123();







        /*Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            public void run() {
                System.out.println("执行");
            }
        }, interval,interval);*/

    }
}
